# -*- coding: UTF-8 -*-
from urllib import request

class HtmlDownloader(object):

    def download(self, url):
        if url is None:
            return None

        print('获取页面：')
        response = request.urlopen(url)
        print(response.getcode())
        print('------------------获取页面结束-------------------')
        if response.getcode() != 200:
            return None
        return response.read()
